using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MissZone : MonoBehaviour
{
    private void OnTriggerEnter2D(Collider2D other) {
        if(other.TryGetComponent<Ball>(out var ball))
        {
            EventHandler.Dispatch(Events.EndGame);
        }
        else if(other.TryGetComponent<Prop>(out var prop))
        {
            prop.gameObject.SetActive(false);
        }
    }
}
